﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using LANChatCore;

namespace LANChatServer
{
    public partial class ServerFrmMain : Form
    {
        ConnectionManager cm = new ConnectionManager();
        private readonly EventHandler _handler;

        public ServerFrmMain()
        {
            InitializeComponent();
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            if (!cm.Start(22))
                tbStatus.Text += "Connection Manager failed to start" + Environment.NewLine;
            else
                tbStatus.Text += "Connection Manager started" + Environment.NewLine;

        }

        private void btnStop_Click(object sender, EventArgs e)
        {
            cm.Stop();
            tbStatus.Text += "Connection Manager stopped" + Environment.NewLine;
        }
    }
}
